
load('summary_data/figA4.rda')

source('utils.R')

out = ggplot(z, aes(x = as.factor(med_hhi_quant), y = med_worth)) +
  geom_boxplot() +
  facet_wrap(~year, ncol = 3) +
  scale_x_discrete(labels = x_l) +
  theme_light() +
  theme(
    strip.background = element_rect(fill='white'),
    strip.text.x = element_text(face = 'bold', size = 12,color = 'black'),
    axis.text.x = element_text(angle = 90, vjust = 0.5, size = 9, hjust = 1)
    ) +
  labs(
    x = 'Tract Median Household Income (2020 ACS5 Homeowners)',
    y = 'Tract Median Net Worth Estimate*',
    caption = '* For CL, L2 matched observations.'
    ) +
  coord_cartesian(ylim=c(0, 3e6))

ggsave(filename = 'figures/figA4.pdf', plot = out, width = 9, height = 5)
